<#import "spring.ftl" as s />

<body onLoad="prettyPrint()>
<header class="navbar-wrapper">

	<div class="navbar navbar-black navbar-fixed-top">
		<div class="container cl">
			<a class="logo navbar-logo hidden-xs"><img src="<@s.url '/logo/logo.png'/>" width="100" height="40" /></a>
			<nav class="nav navbar-nav nav-collapse" role="navigation" id="Hui-navbar">
				<ul class="cl">
					<li class="current"><a href="index">首页</a></li>
					<li><a href="news">新闻</a></li>
					<li><a href="stock">股票</a></li>
					<li><a href="about">关于我们</a></li>
					<li><input class="va-m bk-gray radius" placeholder="股票代码"></li>
				</ul>
			</nav>
		<#if user?exists>
<nav class="navbar-userbar f-r hidden-xs hidden-sm"> 
			<li class="dropDown dropDown_hover"><a href="#" class="btn btn-primary radius dropDown_A">个人中心 <i class="Hui-iconfont">&#xe6d5;</i></a>
						<ul class="dropDown-menu menu radius box-shadow">
							<li><a href="changepic">更改头像</a></li>
							<li><a href="changepwd">更改密码</a>	</li>
							<li><a href="userinfo">个人资料</a>	</li>
							<li><a href="zxg">个人自选股</a>	</li>
							<li><a href="logout">退出</a></li>
							
						</ul>
					</li>
	
			
			</nav>
<#else>
<nav class="navbar-userbar f-r hidden-xs hidden-sm"> 
			<a data-toggle="modal" href="#myModal" class="btn btn-default radius ">
				登录
			</a>  
			<a href="regist" class="btn btn-primary radius" >
				注册
			</a> 
			<a id="haha" class="btn btn-success radius">
				关注微信
			
			</a> 
	
			
			</nav>
</#if>
			
		
		</div>
		 
	</div>
	
	    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
     <div class="modal-header">
        <h3 id="myModalLabel" class="text-c">登录</h3>
        <a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>
     </div>
      <div class="modal-body">
     <form action="login" method="post" class="form form-horizontal responsive" id="loginform" name="loginform">
     	<div class="row cl">
			<label class="form-label col-xs-2">手机：</label>
			<div class="formControls col-xs-5">
				<input type="text" class="input-text" placeholder="@" name="tel" id="tel" datatype="e" nullmsg="请输入手机号！" >
			</div>
			<div class="col-xs-5"> </div>
		</div>
		
				<div class="row cl">
						<label class="form-label col-xs-2 ">密码：</label>
						
						<div class="formControls col-xs-5">
								<input type="password" class="input-text" autocomplete="off" placeholder="密码" name="password" id="password" datatype="*6-18" >
						</div>
						<div class="col-xs-5"> 
						</div>
				</div>

				
     </form>
     </div>
      <div class="modal-footer">
    			 <button id="userlogin" name="userlogin" onclick="login()" class="btn btn-primary" type="button">
     						确定
     			</button> 
     			
    			 <button class="btn" data-dismiss="modal" aria-hidden="true">
     						关闭
     			</button>
     </div>
     
    </div>
    <script type="text/javascript" src="<@s.url '/lib/md5.js'/>"></script>
<script type="text/javascript">
	function login(){
		   var tel = document.getElementById("tel").value;
   var password = faultylabs.MD5(document.getElementById("password").value);
   document.getElementById("password").value = password;
   
   alert(password);
   
 	 document.getElementById("loginform").submit();
   
   
	}
</script>
</header>

<hr>